<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script src="https://cdn.jsdelivr.net/npm/vue@2/dist/vue.js"></script>
<style>
    #a{
        border:1px blue solid;
        width: 1000px;
        height: 100px;
    }
    #b{
        border:1px green solid;
        width: 500px;
        height: 50px;
    }
</style>
</head>
<body>
    <div id="app">
        <div id="a" @mousemove="method1">
            <div id="b" @mousemove="method2">

            </div>
        </div>
        <p>
            {{x}}<br>
            {{y}}
        </p>
    </div>
</body>
<script>
    new Vue({
        el:"#app",
        data:{
            x:0,
            y:0
        },
        methods:{
            method1(event){
                this.x = event.clientX;
                this.y = event.clientY;
            },
            method2(event){
                console.log("p标签："+event.offsetX +"::"+event.offsetY);
            }
        }
    });
</script>
</html>